************************************************************README******************************************************
The file includes one folder that contain the datasets and another contains the codes used to generate all tables in the paper
One has to have access to Stata 11 or higher version to run the codes
Note some commands used are not provided by Stata. One needs to use "ssc install" to install the commands not available with standard Stata
************************************************************************************************************************
The following codes are included
Table 1B for results in Table 1 Panel B
Table 2_3_4_5_A1_A2 for results in Table 2 Table 3 Table 4 Table 5 and Internet Appendix Table A1 Table A2
Table A3 for results in Internet Appendix A3
Table A4 for results in Internet Appendix A4
Table A5 for results in Internet Appendix A5
************************************************************************************************************************
The following datasets are needed to perform the codes
compustat.dta
fac_div.dta
pat.dta
planthit_bygvkeyyear.dta
planthit_bygvkeyyear_fips.dta
planthit_bygvkeyyear_st_imp.dta
planthit_bygvkeyyear_stcode.dta
planthit_bygvkeyyear_type.dta
planthit_bygvkeyyear_wt.dta
state_stcode.dta
sup_div.dta
sup_hhi.dta
tech_div.dta
tech_div_rb.dta
************************************************************************************************************************
Compustat.dta
SOURCE: COMPUSTAT
This dataset contains accounting variables used in the paper

GVKEY: COMPUSTAT company identifier
FYEAR: Fiscal year
STATE: State Location
YEAR: data year generated from datadate in COMPUSTAT database
SIC3: Three digit SIC industry code
AGE: The age of the firm
AT1: Total assets in the previous year
SIZE: Natural log of total assets
SIZE2: The square of size
ROA: Return on assets
ROA: Return on assets in the previous year
TANG: Percentage of intangible assets
RDC: Amortized research and development expenses in the past five years
AD: Amortized advertisement expenses in the past five years   
SGA: Amortized selling, general & administrative expenses in the past five years   
************************************************************************************************************************
fac_div.dta
SOURCE: COMPUSTAT; TRI
This dataset contains the concentration of factory locations measured by Herfindahl index

YEAR: Fiscal Year
GVKEY: COMPUSTAT company identifier
FAC_DIV: Herfindahl index of plant concentration. Value between 0 and 1, with higher value meaning more concentration
************************************************************************************************************************
pat.dta
SOURCE: COMPUSTAT; NBER Patent Database
This dataset contains patent count information

GVKEY: COMPUSTAT company identifier
CALYEAR: Year calculated
SUM5YR: log ratio of patent count
************************************************************************************************************************
planthit_bygvkey.data (All datasets start with PLANTHIT_BYGVKEYYEAR)

Source: TRI
This dataset contains information on the percentage of plants being affected by natural disasters

GVKEY: COMPUSTAT company identifier
YEAR: Reporting year
PAGE: Average age of plants
HIT_RATIO: Percentage of plants hit by natural disasters
************************************************************************************************************************
stcode.dta

This file links state name to STCODE, a numerical number that identifies states
************************************************************************************************************************
sup_div.dta

Source: COMPUSTAT; NBER Patent Database
This dataset contains technology diversity information of suppliers

GVKEY: COMPUSTAT company identifier
FYEAR: Fiscal year
TECH: Average technology diversity of suppliers
TECH1: Average technology diversity of suppliers in the previous fiscal year
************************************************************************************************************************
sup_hhi.dta

Source: COMPUSTAT
This dataset contains information on the concentration of major suppliers for each customer firm

GVKEY: COMPUSTAT company identifier
YEAR: Fiscal year
S_HHI: Herfindahl index of major suppliers.
************************************************************************************************************************
tech_div.dta

Source: COMPUSTAT; NBER Patent Database
This dataset contains measure on technology diversity

GVKEY: COMPUSTAT company identifier
CALYEAR: Year calculated
TECH_DIV: Technology diversity
************************************************************************************************************************
tech_div_rb.dta

Source: COMPUSTAT; NBER Patent Database
This dataset contains robust measures on technology diversity

GVKEY: COMPUSTAT company identifier
CALYEAR: Year calculated
DIV_J: Robust technology diversity (J)
DIV_SUBCAT: Robust technology diversity (SUBCAT)
DIV_CAT2: Robust technology diversity (CAT2)
************************************************************************************************************************



